Migrate from 0.12 to 0.13


Architecture Changes

  1. If NW.js is running under Mixed Context Mode (boot NW.js with --mixed-context argument), nw.* is kind of mirror of window.*. In this mode, you CANNOT share variables among frames or windows by assigning it to Node context. So do NOT turn on Mixed Context mode if your application is heavily depending on this variable sharing feature.

Node.js Changes

  1. Node.js is bumped to 5.x in latest build. Check your NPM modules to make sure they support Node.js 5.x especially for native modules. There is a list of native modules which should be migrated to latest NaN 2.

API Changes

Build Flavors

  1. Different build flavors support different set of APIs and capabilities. See Build Flavors to choose the right NW.js flavor or build your own.

Shorcut

  1. Shortcut API does NOT map Ctrl modifier to on Mac OS X. However 0.13.0 supports Command modifier in cross platform way. So it’s your responsible to detect the OS and choose the right modifier when registering hotkeys. See Shortcut.key for details.

Manifest Format

  1. single-instance is deprecated and it’s always true. You CANNOT have multiple instances for your app.
  2. toolbar is deprecated and it’s always false. The traditional toolbar will NOT be supported including the reload buttons, location bar and DevTools buttons. As a workaround, you can open / close DevTools with F12 (Windows & Linux) or ++i (Mac). And use win.reload() and win.reloadDev() to simulate the reload buttons.
  3. no-edit-menu is deprecated.
  4. snapshot is deprecated. Use win.evalNWBin() instead.
  5. The format of node-remote is changed to array of match patterns used by Chrome extension.

Window

  1. Event capturepagedone of Window API is deprecated. Use the callback with the win.capturePage(callback [, config ]) instead.
  2. Window.open is changed to passing the created window as the argument of the callback.
  3. Window.showDevtools is changed to passing the created window as the argument of the callback.
  4. win.setTransparent is deprecated. You can’t change the transparency after window is created.
  5. unmaximize and leave-fullscreen events of Window object is deprecated and replaced by restore. When window is restored from minimized, maximized or fullscreen, restore event is triggered instead.